package com.mycompany.server;

import java.util.ArrayList;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.mycompany.client.HelloWorldService;
import com.smartgwt.client.widgets.tree.TreeNode;

public class HelloWorldServiceImpl extends RemoteServiceServlet implements
		HelloWorldService {

	private ArrayList<TreeNode> categories = new ArrayList<TreeNode>();
	
	@Override
	public ArrayList<TreeNode> getCategories() {
		generateCategories();
		return categories;
	}
	
	public void generateCategories() {
		for (int i = 0; i < 10; i++) {
			TreeNode test = new TreeNode("kuku" + i);
			categories.add(test);
		}
	}
}
